home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / except.zip / B4DMSGRS.H < prev    next >
C/C++ Source or Header  |  1993-03-02  |  1KB  |  53 lines

  1. //---------------------------------------------------------------------
  2. // b4dmsgrs.h    2-28-93    djf
  3. // B4DMsgResource class definitiion
  4. //
  5. // This class hides the String Resource-Only DLL that holds the
  6. // messages generated by the Message Compiler (MC.EXE) for B4D
  7. // exception codes.
  8. //---------------------------------------------------------------------
  9.  
  10. #if !defined( __B4DMSGRS_H )
  11. #define __B4DMSGRS_H
  12.  
  13. //---------------------------------------------------------------------
  14. // includes
  15. //---------------------------------------------------------------------
  16. #include <windows.h>
  17.  
  18. // this header is created by MC.EXE, which doesn't provide protection
  19. #if !defined( __B4DMSG_H )
  20. #include "b4dmsg.h"
  21. #define __B4DMSG_H
  22. #endif // !defined( __B4DMSG_H )
  23.  
  24. //---------------------------------------------------------------------
  25. // constants
  26. //---------------------------------------------------------------------
  27.  
  28. // This is also defined in B4DMSG.MC:  I hate to define it twice,
  29. // but I don't see how else to do it.
  30. const unsigned long B4D_FACILITY = 0xFFE;
  31.  
  32. class B4DMsgResource
  33. {
  34. public:
  35.     B4DMsgResource();
  36.     virtual ~B4DMsgResource();
  37.  
  38.     // get the message associated with exception code
  39.     // returns a pointer to a static buffer
  40.     const char *get
  41.         ( 
  42.         DWORD     dwExceptionCode,
  43.         DWORD    *pArgs    // pointer to an array of args
  44.         ) const; 
  45.  
  46. private:
  47.  
  48.     HINSTANCE hLib;
  49.  
  50. }; // class B4DMsgResource
  51.  
  52. #endif // !defined( __B4DMSGRS_H )
  53.